package com.lh.microservice1.controller;

import com.lh.microservice1.entity.Person;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;
import java.util.List;

/**
 * @author lh
 * @Description:
 * @date 2021/3/26 9:25
 */
@RestController()
@RequestMapping("/person")
public class PersonController {
	@GetMapping("/getAllPerson")
	public List<Person> getAllPerson() {
		ArrayList<Person> peoples = new ArrayList<>();
		Person person = new Person("lh", 26, "男", "1995-05-27");
		Person person1 = new Person("xhy", 23, "女", "1998-05-27");
		Person person2 = new Person("zho", 31, "男", "1990-05-27");
		peoples.add(person);
		peoples.add(person1);
		peoples.add(person2);
		return peoples;
	}
}
